#include<bits/stdc++.h>
#define sd(n) scanf("%d",&n) 
#define sld(n) scanf("%lld",&n)
#define pd(n) printf("%d", (n))
#define pld(n) printf("%lld", n)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fi first
#define se second
const int N=1e5+10;
#define INF 0x7fffffff
typedef long long int ll;
using namespace std;
//----------------------------------------------------------------------------//
int a[N],n;//Ann?
void solve()
{
	sd(n);
	map<int,int> mp;
	for(int i=1;i<=n;i++)
	{
		sd(a[i]);mp[a[i]]++;
	}
	bool judge=true;
	for(auto [k,v]:mp)
	{
		if(v<=1)
		{
			judge=false;break;
		}
	}
	if(!judge) pd(-1),puts("");
	else
	{
		int l=1,r=1,t=a[1];
		for(int i=2;i<=n;i++)
		{
			if(a[i]==t) r=i;
			if(a[i]!=t||n==i)
			{
				cout<<r<<' ';
				for(int k=l;k<r;k++) cout<<k<<" ";
				l=i,r=i,t=a[i];
			}
		}
	}
	puts("");
}

int main()
{
	int T;
	sd(T);
	while (T--)
	{
		solve();
	}
	return 0;
}